package org.darkforest.dao.mapper;

import org.darkforest.dao.annotation.DBMapper;
import org.darkforest.model.Proxy;
import org.darkforest.vo.MemberBase;
import org.darkforest.vo.SubMemberInfo;
import org.darkforest.vo.SubProxyInfo;

import java.util.List;
import java.util.Map;

@DBMapper
public interface ProxyMapper {
    int deleteByPrimaryKey(Integer proxyId);

    int insert(Proxy record);

    int insertSelective(Proxy record);

    Proxy selectByPrimaryKey(Integer proxyId);

    int updateByPrimaryKeySelective(Proxy record);

    int updateByPrimaryKey(Proxy record);

    int updateTeamId(Proxy proxy);

    /**
     * 根据条件查询代理商信息
     * @param proxy
     * @return
     */
    List<Proxy> findProxyByCondition(Proxy proxy);

    public Integer getProxyCount(Map<String, Integer> param);

    int updateStage(Proxy proxy);

    public Integer getUnderProxyCnt(Integer proxy_id);

    public List<Proxy> getUnderProxyList(SubProxyInfo page);

    public List<MemberBase> getUnderMemberList(SubMemberInfo memberInfoPage);

    public List<Proxy> getInitProxyTeamNum();

    public int getMaxLayer();
}